package main

// _ + 包名 只会执行这个包下面的init方法
import (
	"kms-backend/config"
	_ "kms-backend/controllers/initcontroller"
	"kms-backend/middlewares"
	"kms-backend/routers"

	"kms-backend/utils/logs"

	"github.com/gin-gonic/gin"
)

func main() {

	r := gin.Default()

	//校验jwt的中间件
	r.Use(middlewares.JwtValid)
	logs.Info(nil, "程序启动成功!")

	routers.RegisterRouters(r)
	r.Run(config.Port)

}
